//using PK.InAppPurchase;
//using UnityEngine;

//namespace PKGames.Store.Persistence
//{
//	public class StorePersistenceController
//	{
//		private StorePersistence _storePersistence;

//		private const string StorePersistenceKey = "store_persistence";

//		public StorePersistenceController()
//		{
//			string @string = PlayerPrefs.GetString("store_persistence");
//			_storePersistence = ((!string.IsNullOrEmpty(@string)) ? JsonUtility.FromJson<StorePersistence>(@string) : new StorePersistence());
//		}

//		public void UpdateProduct(StoreProduct storeProduct, string transactionId, BaseStoreManager.PurchaseResult purchaseResult)
//		{
//			ProductPersistence productPersistence = new ProductPersistence(storeProduct, transactionId, purchaseResult);
//			_storePersistence.UpdateProductPersistence(productPersistence);
//			PlayerPrefs.SetString("store_persistence", JsonUtility.ToJson(_storePersistence));
//			PlayerPrefs.Save();
//		}

//		public bool IsProductBought(StoreProduct storeProduct)
//		{
//			return _storePersistence.ProductPersistenceDict.ContainsKey(storeProduct.StoreId) && _storePersistence.ProductPersistenceDict[storeProduct.StoreId].PurchaseResult == BaseStoreManager.PurchaseResult.Success;
//		}
//	}
//}
